xen: sched: introduce the 'null' semi-static scheduler
authorDario Faggioli <dario.faggioli@citrix.com>
Fri, 7 Apr 2017 12:28:15 +0000 (14:28 +0200)
committerGeorge Dunlap <george.dunlap@citrix.com>
Fri, 7 Apr 2017 14:53:14 +0000 (15:53 +0100)
commitd671da3be3ca5f61afedcd585a274f7c0c1c3072
tree26f02e6085ce4041730cdec4f2c814a884d7b88d
parentd92b0e7fca263e0671940d0d446c64e850ca595c
xen: sched: introduce the 'null' semi-static scheduler

In cases where one is absolutely sure that there will be
less vCPUs than pCPUs, having to pay the cost, mostly in
terms of overhead, of an advanced scheduler may be not
desirable.

The simple scheduler implemented here could be a solution.
Here how it works:
 - each vCPU is statically assigned to a pCPU;
 - if there are pCPUs without any vCPU assigned, they
   stay idle (as in, the run their idle vCPU);
 - if there are vCPUs which are not assigned to any
   pCPU (e.g., because there are more vCPUs than pCPUs)
   they *don't* run, until they get assigned;
 - if a vCPU assigned to a pCPU goes away, one of the
   waiting to be assigned vCPU, if any, gets assigned
   to the pCPU and can run there.

This scheduler, therefore, if used in configurations
where every vCPUs can be assigned to a pCPU, guarantees
low overhead, low latency, and consistent performance.

If used as default scheduler, at Xen boot, it is
recommended to limit the number of Dom0 vCPUs (e.g., with
'dom0_max_vcpus=x'). Otherwise, all the pCPUs will have
one Dom0's vCPU assigned, and there won't be room for
running efficiently (if at all) any guest.

Target use cases are embedded and HPC, but it may well
be interesting also in circumnstances.

Kconfig and documentation are update accordingly.

While there, also document the availability of sched=rtds
as boot parameter, which apparently had been forgotten.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
docs/misc/xen-command-line.markdown
xen/common/Kconfig
xen/common/Makefile
xen/common/sched_null.c [new file with mode: 0644]
xen/include/public/domctl.h